import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: () => import('@/components/HelloWorld'),
      children: [
        {
          path: '/',
          name: 'admin',
          component: () => import('@/components/Admin'),
          children: [
            {
              path: '/',
              name: 'recommond',
              component: () => import('@/components/admin/adminList/recommond'),
            },
            {
              path: '/hotMusic',
              name: 'hotMusic',
              component: () => import('@/components/admin/adminList/hotMusic'),
            },
            {
              path: '/search',
              name: 'search',
              component: () => import('@/components/admin/adminList/search'),
            }
          ]
        },
        {
          path: '/musiclist/:id',
          name: 'musiclist',
          component: () => import('@/components/MusicList'),
          props: true
        },
        {
          path: '/play',
          name: 'play',
          component: () => import('@/components/Play')
        }
      ]
    }
  ]
})
